package com.m1book.domain;

/**
 * 授权失败异常。
 * @author Frankie
 *
 */
public class AuthorizationExeption extends Exception {
	private static final long serialVersionUID = 8348171019537688569L;
	
	private String message;

	public enum ExceptionMessage {
		NOT_ABOOK_HOLDER("not abook holder");
		
		private String message;
		
		private ExceptionMessage(String message) {
			this.message = message;
		}

		public String getMessage() {
			return message;
		}
	}
	
	public AuthorizationExeption(ExceptionMessage message) {
		this.message = message.message;
	}

	@Override
	public String getMessage() {
		return message;
	}
}
